# Author: Anthony Giorgio <agiorgio@us.ibm.com>
# ebuild for Tonic
# 

inherit perl-module
DESCRIPTION="Tonic, a security tool written in Perl.  Stable ebuild."
HOMEPAGE="http://w3.opensource.ibm.com/~tonic"
SRC_URI="https://w3.opensource.ibm.com/download/897/174/1045/2423/Tonic-${PV}.tar.gz"
#RESTRICT="fetch"

SLOT="0"
LICENSE="IBM Internal"
KEYWORDS="x86 ~amd64 ~ppc"

DEPEND="dev-lang/perl"

S=${WORKDIR}/Tonic-${PV}
SRC_TONIC=Tonic-${PV}.tar.gz

myconf="PREFIX=${D}/usr CONFINSTDIR=${D}/etc/tonic"

src_unpack() {
	if [ ! -f ${DISTDIR}/${SRC_TONIC} ] ; then
		die "Please download ${SRC_TONIC} from ${HOMEPAGE} to ${DISTDIR}"
	fi
	unpack ${SRC_TONIC} || die
}

src_install() {
    perl-module_src_install
}

pkg_postinst() {
	einfo "Tonic ${PV} has been successfully installed."
	einfo ""
}
